<?php
namespace app\api\validate\1;
class Union extends Base
{
    public function sceneCreate()
    {
        return $this->only(['name', 'mobile_phone', 'contact_email', 'contact_id_number',
            'license_copy', 'license_number', 'merchant_name', 'id_card_copy', 'id_card_national',
            'card_period_begin', 'card_period_end', 'merchant_shortname', 'biz_store_name', 'biz_address_code',
            'biz_store_address', 'store_entrance_pic', 'indoor_pic', 'account_bank', 'bank_address_code', 'account_number'])
            ->append('name', 'require')
            ->append('mobile_phone', 'require')
            ->append('contact_email', 'require')
            ->append('contact_id_number', 'require')
            ->append('license_copy', 'require')
            ->append('license_number', 'require')
            ->append('merchant_name', 'require')
            ->append('id_card_copy', 'require')
            ->append('id_card_national', 'require')
            ->append('card_period_begin', 'require')
            ->append('card_period_end', 'require')
            ->append('merchant_shortname', 'require')
            ->append('biz_store_name', 'require')
            ->append('biz_address_code', 'require')
            ->append('biz_store_address', 'require')
            ->append('store_entrance_pic', 'require')
            ->append('indoor_pic', 'require')
            ->append('account_bank', 'require')
            ->append('bank_address_code', 'require')
            ->append('account_number', 'require');
    }

    protected $message = [
        'name.require' => '请输入超级管理员姓名',
        'mobile_phone.require' => '请输入联系手机',
        'contact_email.require' => '请输入联系邮箱',
        'contact_id_number.require' => '请输入身份证件号码',
        'license_copy.require' => '请上传营业执照照片',
        'license_number.require' => '请输入统一社会信用代码',
        'merchant_name.require' => '请输入商户名称',
        'id_card_copy.require' => '请上传身份证人像面照片',
        'id_card_national.require' => '请上传身份证国徽面照片',
        'card_period_begin.require' => '请输入身份证有效期开始时间',
        'card_period_end.require' => '请输入身份证有效期结束时间',
        'merchant_shortname.require' => '请输入商户简称',
        'biz_store_name.require' => '请输入线下场所名称',
        'biz_address_code.require' => '请选择商户所在地区',
        'biz_store_address.require' => '请输入商户详细地址',
        'store_entrance_pic.require' => '请上传线下场所门头照片',
        'indoor_pic.require' => '请上传线下场所内部照片',
        'account_bank.require' => '请输入银行名称',
        'bank_address_code.require' => '请选择开户行所在地区',
        'account_number.require' => '请输入银行卡号',
        //        'mobile_phone.unique' => '该用户已存在',
//        'username.length' => '用户名长度为6-12个字符',
//        'password.min' => '密码长度为6个字符',
    ];
}